//
//  CYSearchArticleTableViewCell.m
//  cyydt
//
//  Created by chu on 2019/2/1.
//  Copyright © 2019 chu. All rights reserved.
//

#import "CYSearchArticleTableViewCell.h"

@implementation CYSearchArticleTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(CYProjectModel *)model{
    _model = model;
    NSUserDefaults *us = [NSUserDefaults standardUserDefaults];
    NSString * str = [us objectForKey:@"searchValue"];
    self.titleLabel.attributedText = [NSMutableAttributedString stringWithHighLightSubstring:[[Tool sharedInstance] delHTMLBiqoQianWithHtml:model.title] substring:str];
    self.introLabel.attributedText = [NSMutableAttributedString stringWithHighLightSubstring:[[Tool sharedInstance] delHTMLBiqoQianWithHtml:model.content] substring:str];
    self.cateLabel.text = model.catname;
    self.timeLabel.text = model.created_time;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

@end
